// by Xeno
//#define __DEBUG__
#define THIS_FILE "fn_checksmshothd.sqf"
#include "x_setup.sqf"

private ["_object","_ammo","_dmg"];
_object = _this select 0;
_ammo = _this select 4;

#ifdef __DEBUG__
__TRACE_1("","_this");
_bla = getText(configFile/"CfgAmmo"/_ammo/"simulation");
__TRACE_1("","_bla");
#endif

_dmg = 0;
if (toUpper(getText(configFile/"CfgAmmo"/_ammo/"simulation")) in GVAR(hd_sim_types)) then {
	_dmg = (_this select 2);
};
if (_dmg > 0 && {((_object isKindOf "Cargo_base_F") || (_object isKindOf "House") || (_object isKindOf "House_F") || (_object isKindOf "ReammoBox_F"))}) then {
	__TRACE_1("extra dmg","(typeof _object)");
	_dmg = 3 * _dmg;
};
__TRACE_1("_dmg","_dmg");
_dmg